<template>
    <div style="text-align: center">
        <van-nav-bar fixed="true" title="个人信息" left-text="返回" @click-left="onClickLeft" left-arrow>
        </van-nav-bar>
        <div>
            <van-cell-group style="margin-top: 46px">
                <van-cell>头像：<img width="100%" :src="userLists.lawUserImage"></van-cell>
                <van-cell >姓名：{{userLists.lawUserName}} </van-cell>
                <van-cell>性别：{{userLists.lawUserSex}}</van-cell>
                <van-cell>年龄：{{userLists.lawUserAge}}</van-cell>
                <van-cell>账号：{{userLists.lawUserNumber}}</van-cell>
                <van-cell>密码：{{userLists.lawUserPwd}}</van-cell>
            </van-cell-group>
        </div>
        <router-link to="userChangeMessage">
            <van-button style="margin-top: 10px" size="small" color="linear-gradient(to right, #4bb0ff, #6149f6)" round
                        type="info">修改信息
            </van-button>
        </router-link>
    </div>
</template>

<script>
    export default {
        name: "userMessage",
        data() {
            return {
                userLists: {}
            }
        },
        methods: {
            onClickLeft() {
                this.$router.push({path: 'userCenter'})
            },
            userMessage() {
                let user = JSON.parse(localStorage.getItem('token') || '{}');
                this.userLists = user
                console.log(this.userLists)
            }
        },
        mounted() {
            this.userMessage()
        }
    }
</script>


<style scoped>

</style>
